import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-04-28
 * Time:9:32
 */

public class Test {
    public static void main(String[] args) {
        Room room1=new Room("实验楼",301);
        Room room2=new Room("逸夫楼",409);
        Course course1 =new Course("高等数学",88);
        Course course2 =new Course("英语",89);
        Student student1=new Student("孙悟空",22,room1,room2,course1,course2);
        Room room3=new Room("体育馆",308);
        Room room4=new Room("实验楼",206);
        Course course3 =new Course("体育",91);
        Course course4 =new Course("心理学",92);
        Student student2=new Student("猪八戒",18,room3,room4,course3,course4);
        Room room5=new Room("逸夫楼",310);
        Room room6=new Room("实验楼",318);
        Course course5 =new Course("机械制图",88);
        Course course6 =new Course("大学物理",91);
        Student student3=new Student("沙和",21,room5,room6,course5,course6);
        Student arr[]=new Student [3];
        arr[0]=student1;
        arr[1]=student2;
        arr[2]=student3;
        for (int i = 0; i < 3; i++) {
            arr[i].show();
        }
        //
        Scanner scanner=new Scanner(System.in);
        String name=scanner.nextLine();
        for (int i = 0; i < 3; i++) {
            if(name.equals(arr[i].getName())){
                arr[i].show();
                break;
            }
        }
    }
}
